package love.bot.forli.group.review.service;

import love.bot.forli.group.review.bean.GroupMember;
import org.springframework.lang.Nullable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 群成员列表查询服务接口
 *
 * @author ForteScarlet
 */
// @FeignClient("bot-info")
public interface GroupService {

    /**
     * 获取某个群里的人员列表。
     *
     * @param group  group code
     * @param offset 偏移量 默认为0
     * @param limit  数据量 默认为10
     * @return member list
     */
    @GetMapping("/group/{group}/members")
    List<GroupMember> getMembers(@PathVariable("group") String group,
                                 @Nullable @RequestParam(value = "offset", required = false) Integer offset,
                                 @Nullable @RequestParam(value = "offset", required = false) Integer limit);

    /**
     * 获取某群下人员数量
     *
     * @param group group code
     * @return total number
     */
    @GetMapping("/group/{group}/total")
    Long memberTotal(@PathVariable("group") String group);
}
